package se.zens.demo.wsapp.interfaces;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

import se.zens.demo.wsapp.interfaces.model.AddExchangeRateRequest;
import se.zens.demo.wsapp.interfaces.model.AddExchangeRateRessponse;
import se.zens.demo.wsapp.interfaces.model.ConvertAmountRequest;
import se.zens.demo.wsapp.interfaces.model.ConvertAmountResponse;
import se.zens.demo.wsapp.interfaces.model.GetExchangeRateRequest;
import se.zens.demo.wsapp.interfaces.model.GetExchangeRateRessponse;

/**
 * SOAP WS interface providing exchange rate information 
 */
@WebService
public interface ExchangeRatesService
{
	/**
	 * Convert amount to target currency 
	 * @param request {@link ConvertAmountRequest}
	 * @return
	 */
	@WebMethod(operationName="convertAmount")
	ConvertAmountResponse convertAmount(@WebParam(name="request") ConvertAmountRequest request);
	
	/**
	 * Get current exchange rate of 1 unit of origin currency
	 * @param request
	 * @return
	 */
	@WebMethod(operationName="getExchangeRate")
	GetExchangeRateRessponse getExchangeRate(@WebParam(name="request") GetExchangeRateRequest request);
	
	/**
	 * Add or update current exchange rate
	 * @param request
	 * @return
	 */
	@WebMethod(operationName="addExchangeRate")
	AddExchangeRateRessponse addExchangeRate(@WebParam(name="request") AddExchangeRateRequest request);
	
	
}
